home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / Servers.p < prev    next >
Text File  |  1996-05-01  |  3KB  |  98 lines

  1. {
  2.      File:        Servers.p
  3.  
  4.      Contains:    Server Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Servers;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __SERVERS__}
  28. {$SETC __SERVERS__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ServersIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CODEFRAGMENTS__}
  35. {$I CodeFragments.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __KERNEL__}
  38. {$I Kernel.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __FILEMANAGERTYPES__}
  41. {$I FileManagerTypes.p}
  42. {$ENDC}
  43.  
  44. {$PUSH}
  45. {$ALIGN POWER}
  46. {$LibExport+}
  47.  
  48. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  49.  
  50. TYPE
  51.     ServerID = ^LONGINT;
  52.  
  53. CONST
  54.     kCreateServerResType        = 'srvr';
  55.     kCreateServerResID            = 0;
  56.  
  57.  
  58. TYPE
  59.     CreateServerOptions                    = OptionBits;
  60.  
  61. CONST
  62.     kServerReservesLowMem        = $00000001;                    {  Cannot be enabled with kServerIsPrivileged }
  63.     kServerIsPrivileged            = $00000002;                    {  Cannot be enabled with kServerReservesLowMem }
  64.     kCreateServerForLookup        = $00000004;
  65.     kCreateServerAtStartup        = $00000008;
  66.  
  67.  
  68. TYPE
  69.     CreateServerDescriptorPtr = ^CreateServerDescriptor;
  70.     CreateServerDescriptor = RECORD
  71.         createOptions:            CreateServerOptions;
  72.         name:                    TaskName;
  73.         taskOptions:            TaskOptions;
  74.         stackSize:                ByteCount;
  75.         serverName:                Str63;
  76.     END;
  77.  
  78.     ServerMainEntry = ProcPtr;  { PROCEDURE ServerMainEntry(server: ServerID); C; }
  79.  
  80. FUNCTION CreateServer(fileRef_t: FSObjectRef; {CONST}VAR deathNotification_i: KernelNotification; timeout_i: Duration; VAR serverName_o: Str63; VAR server_o: ServerID; VAR refcon_o: UNIV Ptr): OSStatus; C;
  81. FUNCTION CreateServerAsync(fileRef_t: FSObjectRef; {CONST}VAR deathNotification_i: KernelNotification; {CONST}VAR asyncNotification_i: KernelNotification; VAR serverName_o: Str63; VAR server_o: ServerID; VAR refcon_o: UNIV Ptr): OSStatus; C;
  82. FUNCTION RegisterServer(fileRef_t: FSObjectRef; VAR serverName_o: Str63): OSStatus; C;
  83. FUNCTION DeregisterServer(serverName_t: Str63): OSStatus; C;
  84. FUNCTION LookupServer(serverName_t: Str63; timeout_i: Duration; VAR server_o: ServerID; VAR refcon_o: UNIV Ptr): OSStatus; C;
  85. FUNCTION LookupServerAsync(serverName_t: Str63; {CONST}VAR asyncNotification_i: KernelNotification; VAR server_o: ServerID; VAR refcon_o: UNIV Ptr): OSStatus; C;
  86. FUNCTION ServerCreated(server_t: ServerID; refcon_i: UNIV Ptr): OSStatus; C;
  87. {$ENDC}
  88. {$ALIGN RESET}
  89. {$POP}
  90.  
  91. {$SETC UsingIncludes := ServersIncludes}
  92.  
  93. {$ENDC} {__SERVERS__}
  94.  
  95. {$IFC NOT UsingIncludes}
  96.  END.
  97. {$ENDC}
  98.